#ifndef GAMEPANELWIDGET_H
#define GAMEPANELWIDGET_H

#include <QWidget>

class GamePanelWidget : public QWidget
{
    Q_OBJECT
public:
    explicit GamePanelWidget(QWidget *parent = 0);
    ~GamePanelWidget();

    void SetR(int row);

    void Start();
    void Stop();

signals:
    void signalWin();

public slots:

private:
    int *m_map;
    int m_R;

    bool m_bStart;
private:
    void MoveBlock(int row, int col);
    void CheckWin();
    void InitMapDigital();

protected:
    void paintEvent(QPaintEvent *);
    void mousePressEvent(QMouseEvent *e);
};

#endif // GAMEPANELWIDGET_H
